﻿using System;

class ReturnMinMaxNumber
{
    static void Main()
    {
        int numberN;
        int currentInput;

        Console.WriteLine("Type a number:");
        bool isNumberValid = int.TryParse(Console.ReadLine(), out numberN);
        int min = int.MaxValue;
        int max = int.MinValue;

        if (isNumberValid)
        {
            for (int i = 1; i <= numberN; i++)
            {
                isNumberValid = int.TryParse(Console.ReadLine(), out currentInput);
                if (currentInput > max)
                {
                    max = currentInput;
                }
                if (currentInput < min)
                {
                    min = currentInput;

                }
            }
            Console.WriteLine("The minimum number is:{0}",min);
            Console.WriteLine("The maximum number is:{0}", max);
        }
        else
        {
            Console.WriteLine("Your input isn`t OK!!!");
        }
    }
}
